Package com.toc.lib

Source Code of com.toc.lib.ExceptionHelper

package com.toc.lib;

import com.toc.lib.exception.AppException;
import com.toc.lib.exception.SysException;

public class ExceptionHelper {
  public static GenericException parse(Exception e) {
    try {
      e.printStackTrace();
      return new SysException(null,null);
    } catch(Exception ex) {
      ex.printStackTrace();
      return new SysException(null,null);
    }
  }
 
  public static void log(Exception e) {
    try {
      e.printStackTrace();
    } catch(Exception ex) {
    }
  }
 
  public static AppException raise(String errorCode, String errorInformation) {
    //TODO: Remove it when test is done
    System.out.println(errorInformation);
    return new AppException(errorCode,errorInformation);
  }
}
TOP

Related Classes of com.toc.lib.ExceptionHelper

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.